package com.jcl.recruit.user.mapper;

import com.jcl.recruit.user.model.UserOtherjob;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 刘明新
 * @date 2018/8/15 上午11:22
 */
public interface UserOtherjobMapper {

    @Insert({
            "insert into user_otherjob set user_id = #{userId},other_jid = #{otherJid}"
    })
    int insert(UserOtherjob userOtherjob);

    @Insert({
            "<script>",
            "insert into user_otherjob (user_id,other_jid)",
            "values",
            "<foreach collection='list' item='entity' index='index' separator=','>",
            "(#{entity.userId},#{entity.otherJid})",
            "</foreach>",
            "</script>"
    })
    int batchInsert(@Param("list") List<UserOtherjob> list);
}
